home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
thinkref
/
archive
/
THINKPascalUH2.1.sea
/
THINKPas Univ Hdr 2.1
/
Interfaces
/
ImageCodec.p
< prev
next >
Wrap
Text File
|
1995-09-14
|
6KB
|
195 lines
{ Converted with MPW2TPas Tuesday, September 12, 1995 7:13:23 PM }
{}
{ File: ImageCodec.p}
{ }
{ Contains: QuickTime Interfaces.}
{ }
{ Version: Technology: QuickTime 2.0}
{ Package: Universal Interfaces 2.1 in “MPW Latest” on ETO #18}
{ }
{ Copyright: © 1984-1995 by Apple Computer, Inc.}
{ All rights reserved.}
{ }
{ Bugs?: If you find a problem with this file, use the Apple Bug Reporter}
{ stack. Include the file and version information (from above)}
{ in the problem description and send to:}
{ Internet: apple.bugs@applelink.apple.com}
{ AppleLink: APPLE.BUGS}
{ }
{}
unit ImageCodec;
interface
{$IFC UNDEFINED __IMAGECODEC__}
{$SETC __IMAGECODEC__ := 1}
uses
ConditionalMacros, Types, Quickdraw, QDOffscreen, Controls, Windows, Components, Dialogs, StandardFile, ImageCompression, Movies;
{ $PUSH}
{ $ALIGN MAC68K}
{ $LibExport+}
const
codecGetCodecInfo = $00;
codecGetCompressionTime = $01;
codecGetMaxCompressionSize = $02;
codecPreCompress = $03;
codecBandCompress = $04;
codecPreDecompress = $05;
codecBandDecompress = $06;
codecCDSequenceBusy = $07;
codecGetCompressedImageSize = $08;
codecGetSimilarity = $09;
codecTrimImage = $0A;
codecRequestSettings = $0B;
codecGetSettings = $0C;
codecSetSettings = $0D;
codecCDSequenceFlush = $0E;
codecSetTimeCode = $0F;
codecCanScale = $1;
codecCanMask = $2;
codecCanMatte = $4;
codecCanTransform = $8;
codecCanTransferMode = $10;
codecCanCopyPrev = $20;
codecCanSpool = $40;
codecCanClipVertical = $80;
codecCanClipRectangular = $100;
codecCanRemapColor = $200;
codecCanFastDither = $400;
codecCanSrcExtract = $800;
codecCanCopyPrevComp = $1000;
codecCanAsync = $2000;
codecCanMakeMask = $4000;
codecCanShift = $8000;
codecCanAsyncWhen = $10000;
codecCanShieldCursor = $20000;
codecCanManagePrevBuffer = $40000;
type
CodecCapabilities = record
flags: LONGINT;
wantedPixelSize: INTEGER;
extendWidth: INTEGER;
extendHeight: INTEGER;
bandMin: INTEGER;
bandInc: INTEGER;
pad: INTEGER;
time: LONGINT;
end;
const
codecConditionFirstBand = $1;
codecConditionLastBand = $2;
codecConditionFirstFrame = $4;
codecConditionNewDepth = $8;
codecConditionNewTransform = $10;
codecConditionNewSrcRect = $20;
codecConditionNewMask = $40;
codecConditionNewMatte = $80;
codecConditionNewTransferMode = $100;
codecConditionNewClut = $200;
codecConditionNewAccuracy = $400;
codecConditionNewDestination = $800;
codecConditionFirstScreen = $1000;
codecConditionDoCursor = $2000;
codecConditionCatchUpDiff = $4000;
codecConditionCodecChangedMask = $80000000;
codecInfoResourceType = 'cdci';
codecInterfaceVersion = 2;
type
CodecCompressParams = record
sequenceID: ImageSequence;
imageDescription: ImageDescriptionHandle;
data: Ptr;
bufferSize: LONGINT;
frameNumber: LONGINT;
startLine: LONGINT;
stopLine: LONGINT;
conditionFlags: LONGINT;
callerFlags: CodecFlags;
capabilities: ^CodecCapabilities;
progressProcRecord: ICMProgressProcRecord;
completionProcRecord: ICMCompletionProcRecord;
flushProcRecord: ICMFlushProcRecord;
srcPixMap: PixMap;
prevPixMap: PixMap;
spatialQuality: CodecQ;
temporalQuality: CodecQ;
similarity: Fixed;
dataRateParams: DataRateParamsPtr;
reserved: LONGINT;
end;
CodecDecompressParams = record
sequenceID: ImageSequence;
imageDescription: ImageDescriptionHandle;
data: Ptr;
bufferSize: LONGINT;
frameNumber: LONGINT;
startLine: LONGINT;
stopLine: LONGINT;
conditionFlags: LONGINT;
callerFlags: CodecFlags;
capabilities: ^CodecCapabilities;
progressProcRecord: ICMProgressProcRecord;
completionProcRecord: ICMCompletionProcRecord;
dataProcRecord: ICMDataProcRecord;
port: CGrafPtr;
dstPixMap: PixMap;
maskBits: BitMapPtr;
mattePixMap: PixMapPtr;
srcRect: Rect;
matrix: ^MatrixRecord;
accuracy: CodecQ;
transferMode: INTEGER;
frameTime: ICMFrameTimePtr;
reserved: array[0..0] of LONGINT;
matrixFlags: SInt8;
matrixType: SInt8;
dstRect: Rect;
end;
const
matrixFlagScale2x = $80;
function CDGetCodecInfo (storage: Handle; var info: CodecInfo): ComponentResult;
function CDGetCompressionTime (storage: Handle; src: PixMapHandle; {CONST}
var srcRect: Rect; depth: INTEGER; var spatialQuality: CodecQ; var temporalQuality: CodecQ; var time: LONGINT): ComponentResult;
function CDGetMaxCompressionSize (storage: Handle; src: PixMapHandle; {CONST}
var srcRect: Rect; depth: INTEGER; quality: CodecQ; var size: LONGINT): ComponentResult;
function CDPreCompress (storage: Handle; var params: CodecCompressParams): ComponentResult;
function CDBandCompress (storage: Handle; var params: CodecCompressParams): ComponentResult;
function CDPreDecompress (storage: Handle; var params: CodecDecompressParams): ComponentResult;
function CDBandDecompress (storage: Handle; var params: CodecDecompressParams): ComponentResult;
function CDCodecBusy (storage: Handle; seq: ImageSequence): ComponentResult;
function CDGetCompressedImageSize (storage: Handle; desc: ImageDescriptionHandle; data: Ptr; bufferSize: LONGINT; dataProc: ICMDataProcRecordPtr; var dataSize: LONGINT): ComponentResult;
function CDGetSimilarity (storage: Handle; src: PixMapHandle; {CONST}
var srcRect: Rect; desc: ImageDescriptionHandle; data: Ptr; var similarity: Fixed): ComponentResult;
function CDTrimImage (storage: Handle; Desc: ImageDescriptionHandle; inData: Ptr; inBufferSize: LONGINT; dataProc: ICMDataProcRecordPtr; outData: Ptr; outBufferSize: LONGINT; flushProc: ICMFlushProcRecordPtr; var trimRect: Rect; progressProc: ICMProgressProcRecordPtr): ComponentResult;
function CDRequestSettings (storage: Handle; settings: Handle; var rp: Rect; filterProc: ModalFilterUPP): ComponentResult;
function CDGetSettings (storage: Handle; settings: Handle): ComponentResult;
function CDSetSettings (storage: Handle; settings: Handle): ComponentResult;
function CDCodecFlush (storage: Handle): ComponentResult;
function CDCodecSetTimeCode (storage: Handle; timeCodeFormat: univ Ptr; timeCodeTime: univ Ptr): ComponentResult;
{ $ALIGN RESET}
{ $POP}
{$ENDC}
{__IMAGECODEC__}
implementation
end.